<template>
  <div class="swiper_container">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="(item,index) in banner" :key="index">
        <img :src="item.picUrl" alt="">
      </van-swipe-item>
    </van-swipe>
    <HomeMenu />
  </div>
</template>

<script>
import HomeMenu from './HomeMenu'

export default {
    components:{
        HomeMenu
    },
    data(){
        return {
            banner:[]
        }
    },
    mounted(){
        this.$network.getBanner().then((res)=>{
            // console.log(res.data.data)
            this.banner = res.data.data
        }).catch((error)=>{
            console.log(error)
        })
    }
};
</script>

<style scoped>
.swiper_container {
  width: 100%;
  height: 7rem;
  background-color: #fff;
  position: relative;
}
.swiper_container img {
    width: 100%;
    height: 6rem;
}
</style>